#include <stdio.h>
#include <string.h>

unsigned int swap(unsigned int);

int main(int argc, char *argv[])
{
    unsigned int num;
    num = 0x123456;
    num = swap(num);
    printf("%x\n", num);
    return 0;
}

unsigned int swap(unsigned int x) { return ((x << 24) | (x << 8 & 0xff0000) | (x >> 24) | (x >> 8 & 0xff00)); }
